package cn.funeralobjects.asms.repository;

import cn.funeralobjects.asms.entity.ESmsSign;
import cn.funeralobjects.common.repository.CodeRepository;
import cn.funeralobjects.common.repository.EntityRepository;
import cn.funeralobjects.common.repository.NameRepository;

/**
 * Repository of ESmsSign
 *
 * @author FuneralObjects
 * Create date: 2020/5/31 9:24 PM
 */
public interface ESmsSignRepository extends EntityRepository<ESmsSign, Integer>, NameRepository<ESmsSign, Integer>, CodeRepository<ESmsSign, Integer> {

    /**
     * 判断是否存在实体
     *
     * @param prodResName 产品资源编码
     * @param signName    签名名称
     * @return true - 存在
     */
    boolean existsAllByProdResCodeAndSignName(String prodResName, String signName);

    /**
     * 判断是否存在实体
     *
     * @param prodResName 产品资源编码
     * @param signName    签名名称
     * @param id          排除id
     * @return true - 存在
     */
    boolean existsAllByProdResCodeAndSignNameAndIdNot(String prodResName, String signName, Integer id);
}
